package com.lx.ngsl.exam.hsitory.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.lx.ngsl.exam.hsitory.entity.historyEnetity;
import com.lx.ngsl.exam.hsitory.service.historyService;
import com.lx.ngsl.exam.score.entity.ScoreEntity;
@RestController
@RequestMapping("/history")
public class historyController {
	@Autowired
	historyService service;
	//学员成绩管理
	@GetMapping("/query")
public Page<historyEnetity> query(@RequestParam(value="name",required=true,defaultValue = "") String name,
		            @RequestParam(value="title",required=true,defaultValue = "") String title,
		            Pageable pageable) {
	return service.query(name,title,pageable);
}
//app端接口查询
	@GetMapping("/historyquery")
	public	List<ScoreEntity> historyquery(@RequestParam(value="userid",required=true,defaultValue = "")String userid) {
		return service.historyquery(userid);
	}
}
